#include <Eigen/Core>
#include <GL/glut.h>
#include <GL/glu.h>
#include <vector>
#include "triple.h"
#include <stdlib.h>

#ifndef LINK_H
#define LINK_H

using namespace Eigen;
using namespace std;
class Link{
	public:
		Link(Vector3f p, float t, float l);
		Link(Vector3f p, Vector3f rotate_axis, float t, float l);
		Link(Vector3f s, Vector3f e);
		~Link();
		Vector3f getLocal(Vector3f m);
		void drawCube(float x , float y , float z);
		void draw();
		float theta;
		float length;
		Vector3f axis;
		Vector3f pos;
		Vector3f end;
		Vector3f origin;
		float r;
		float g;
		float b;
		Vector3f getMid();
		Matrix<float, 4, 4> tMatrix;
		vector<triple*> vertices;
		EIGEN_MAKE_ALIGNED_OPERATOR_NEW
		
};

#endif
